<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
    <h3>{{msg}}</h3>
    <button @click="fn()">修改title属性值</button>
    <!-- 1. 完整使用 v-bind 指令，完成修改属性的值 -->
    <div v-bind:title="title">元素</div>
    <!-- 2. 简写写法 -->
    <div :title="title">元素</div>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        msg: 'hi vue',
        title: '我是提示'
      },
      methods: {
        fn () {
          this.title = '修改提示'
        }
      }
    })
  </script>
</body>
</html>